Page({
  data: {
    // 房屋详情
    houseDetail: {}
  },
  onLoad({ id }) {
    console.log(id);
    this.getHouseDetail(id)
  },
  // 获取房屋详情
  async getHouseDetail(id) {
    let res = await wx.http.get('/room/' + id)
    console.log(res);
    this.setData({
      houseDetail: res
    })
  },
  editHouse() {
    wx.navigateTo({
      url: '/house_pkg/pages/form/index?id=' + this.data.houseDetail.id,
    })
  },
})
